Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We鈥檒l occasionally send you account related emails.

Already on GitHub? Sign in to your account

Only initialize Nuki configurations #49747

Merged
merged 4 commits into from
May 7, 2021
Merged

Only initialize Nuki configurations #49747

merged 4 commits into from
May 7, 2021

Conversation

darkson95
Copy link
Contributor

@darkson95 darkson95 commented Apr 27, 2021

Breaking change

No breaking changes, only a bug fix.

Proposed change

The Nuki integration initializes now only lock-configurations if it has the following 3 keys in it: host, port, token

Type of change

  • Dependency upgrade
  • Bugfix (non-breaking change which fixes an issue)
  • New integration (thank you!)
  • New feature (which adds functionality to an existing integration)
  • Breaking change (fix/feature causing existing functionality to break)
  • Code quality improvements to existing code or addition of tests

Example entry for configuration.yaml:

# Example configuration.yaml

Additional information

Checklist

  • The code change is tested and works locally.
  • Local tests pass. Your PR cannot be merged unless tests pass
  • There is no commented out code in this PR.
  • I have followed the development checklist
  • The code has been formatted using Black (black --fast homeassistant tests)
  • Tests have been added to verify that the new code works.

If user exposed functionality or configuration variables are added/changed:

If the code communicates with devices, web services, or third-party tools:

  • The manifest file has all fields filled out correctly.
    Updated and included derived files by running: python3 -m script.hassfest.
  • New or updated dependencies have been added to requirements_all.txt.
    Updated by running python3 -m script.gen_requirements_all.
  • Untested files have been added to .coveragerc.

The integration reached or maintains the following Integration Quality Scale:

  • No score or internal
  • 馃 Silver
  • 馃 Gold
  • 馃弳 Platinum

To help with the load of incoming pull requests:

@homeassistant
Copy link
Contributor

Hi @darkson95,

It seems you haven't yet signed a CLA. Please do so here.

Once you do that we will be able to review and accept this pull request.

Thanks!

@probot-home-assistant
Copy link

Hey there @pschmitt, @pvizeli, @pree, mind taking a look at this pull request as its been labeled with an integration (nuki) you are listed as a codeowner for? Thanks!
(message by CodeOwnersMention)

@pree
Copy link
Member

pree commented Apr 27, 2021

This wouldn't import configurations when they don't specify a port (e.g. using the default port)?

@darkson95
Copy link
Contributor Author

Yes, but if you don't specify a port, you will get an error like @remyderuysscher (#48358 (comment)). If you configure Nuki over the UI the port is set.

@pree
Copy link
Member

pree commented Apr 30, 2021

Couldn't we just set the default port then? Otherwise it wouldn't import configurations that don't specify a port (should be the bulk of them). The configuration import should also be removed in the Juni release as it will be deprecated for 2 releases then.

homeassistant/components/nuki/__init__.py Outdated Show resolved Hide resolved
Dev automation moved this from Needs review to Review in progress Apr 30, 2021
@pvizeli pvizeli added this to the 2021.5.1 milestone May 6, 2021
Copy link
Member

@balloob balloob left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

For now it's an ok bug fix but this is the complete wrong approach.

Platforms don't have to be configured under their domain, they can be configured under light bla: in YAML. That's being missed here. The only way to do this correctly is to have an async_setup_platform to support the old config and then import that.

For now this can go in the hot fix, but this should be refactored.

@balloob balloob merged commit 316f6ba into home-assistant:dev May 7, 2021
Dev automation moved this from Review in progress to Done May 7, 2021
@pvizeli
Copy link
Member

pvizeli commented May 7, 2021

I think the next release will drop yaml support, right @pree ?

@pree
Copy link
Member

pree commented May 7, 2021

I think the next release will drop yaml support, right @pree ?

Yes, I will open a PR soon for this.

frenck pushed a commit that referenced this pull request May 7, 2021
Co-authored-by: Paulus Schoutsen <balloob@gmail.com>
@frenck frenck mentioned this pull request May 7, 2021
@github-actions github-actions bot locked and limited conversation to collaborators May 8, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
Dev
  
Done
Development

Successfully merging this pull request may close these issues.

Nuki - "New devices discovered" after restart
6 participants